#include <iostream>
#include <vector>
#include <algorithm>

void parseStr(std::string num_str, std::vector<int> &peach_num)
{
    int pos = 0;
    while (1)
    {
        int idx = num_str.find(' ', pos);
        if (idx == std::string::npos)
        {
            break;
        }
        else
        {
            peach_num.push_back(std::stoi(num_str.substr(pos, idx - pos)));
            pos = idx + 1;
        }
    }
    peach_num.push_back(std::stoi(num_str.substr(pos)));
}

bool check(std::vector<int> &peach_num, int H, int k)
{
    int cost = 0;
    for (int i = 0; i < peach_num.size(); i++)
    {
        cost += (peach_num[i] + k - 1) / k;
    }

    if (cost > H)
        return false;
    else
        return true;
}

int main()
{
    std::vector<int> peach_num;
    int H;
    std::string num_str;
    std::getline(std::cin, num_str);
    std::cin >> H;

    parseStr(num_str, peach_num);

    // for (int i = 0; i < peach_num.size(); i++)
    // {
    //     std::cout << peach_num[i] << std::endl;
    // }

    auto min_it = std::min_element(peach_num.begin(), peach_num.end());
    auto max_it = std::max_element(peach_num.begin(), peach_num.end());

    int minv = *min_it - 1;
    int maxv = *max_it + 1;

    int minK = 1e9;
    while (minv < maxv)
    {
        int mid = minv + (maxv - minv) / 2;
        if (check(peach_num, H, mid))
        {
            minK = std::min(minK, mid);
            maxv = mid;
        }
        else
        {
            minv = mid + 1;
        }
    }

    std::cout << minK << std::endl;
    return 0;
}